#include<iostream>
#include<vector>
#include <string>
#include <math.h>
using namespace std;

int  count(vector<int> vec)
{
	int count = 0;
	for (auto ele : vec)
	{
		if (ele != -1)
		{
			count++;
		}
	}
	return count;

}
void calc(vector<int> &vec,const int M,int j)
{
	if (count(vec) < M)
	{
		return;
	}
	int i = 0;
	int count1 = 0;
	int p = 0;
	for (int i =j; i < vec.size(); i++)
	{
	
		if (vec[i] == -1)
			continue;
		count1++;
		if (count1 == M )
		{
			p = i+1;
	
			vec[i] = -1;
		}
		if (count1 <M && i == vec.size() - 1 )
		{
			i = -1;
		}
	}
	calc(vec,  M,p);

}

int main()

{
	int num = 0;
	while (cin >> num)
	{
		if (num <= 1 || num >= 100)
			cout << "ERROR" << endl;
		vector<int > vec(100, 0);
		for (int i = 0; i < 100; i++)
		{
			vec[i] = i + 1;
		}
		calc(vec, num,0);
		vector<int > vec2;
		for (auto ele : vec)
		{
			if (ele == -1)
				continue;
			vec2.push_back(ele);
		}

		for (int k = 0; k < vec2.size(); k++)
		{
			if (k == vec2.size() - 1)
			{
				cout << vec2[k] << endl;
			}
			else
			{
				cout << vec2[k] << ",";
			}
		}

	}




}
